From fb06b576ab89203f59dd2e506b9fb553669f00fb Mon Sep 17 00:00:00 2001 From: fthx <17156-fthx@users.noreply.gitlab.gnome.org> Date: Mon, 16 Feb 2026 09:41:58 +0000 Subject: [PATCH] dash: Disconnect overview signals on destroy While we never destroy the dash ourselves, extensions that replace it might, so better disconnect the signals properly instead of leaking the handlers in that case. Part-of: --- js/ui/dash.js | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/js/ui/dash.js b/js/ui/dash.js index 1df9414b4..8dc16dc6a 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -387,18 +387,14 @@ export const Dash = GObject.registerClass({ AppFavorites.getAppFavorites().connect('changed', this._queueRedisplay.bind(this)); this._appSystem.connect('app-state-changed', this._queueRedisplay.bind(this)); - Main.overview.connect('item-drag-begin', - this._onItemDragBegin.bind(this)); - Main.overview.connect('item-drag-end', - this._onItemDragEnd.bind(this)); - Main.overview.connect('item-drag-cancelled', - this._onItemDragCancelled.bind(this)); - Main.overview.connect('window-drag-begin', - this._onWindowDragBegin.bind(this)); - Main.overview.connect('window-drag-cancelled', - this._onWindowDragEnd.bind(this)); - Main.overview.connect('window-drag-end', - this._onWindowDragEnd.bind(this)); + Main.overview.connectObject( + 'item-drag-begin', () => this._onItemDragBegin(), + 'item-drag-end', () => this._onItemDragEnd(), + 'item-drag-cancelled', () => this._onItemDragCancelled(), + 'window-drag-begin', () => this._onWindowDragBegin(), + 'window-drag-cancelled', () => this._onWindowDragEnd(), + 'window-drag-end', () => this._onWindowDragEnd(), + this); // Translators: this is the name of the dock/favorites area on // the bottom of the overview -- 2.39.5